<?php
echo '<table class="contact_list">'."\n";
echo '<tr>'."\n";
echo "\t".'<th>First Name</th>'."\n";
echo "\t".'<th>Last Name</th>'."\n";
echo "\t".'<th>Email</th>'."\n";
echo "\t".'<th>Phone</th>'."\n";
echo "\t".'<th></th>'."\n";
echo '</tr>'."\n";
if ( is_array( $contacts )) foreach ( $contacts as $c ) {
    echo '<tr>'."\n";
    echo "\t".'<td>'.$c[ 'fname' ].'</td>'."\n";
    echo "\t".'<td>'.$c[ 'lname' ].'</td>'."\n";
    echo "\t".'<td>'.$c[ 'email' ].'</td>'."\n";
    echo "\t".'<td>'.$c[ 'phone' ].'</td>'."\n";
    echo "\t".'<td><a href="edit.php?id='.$c[ 'rowid' ].'">edit</a></td>'."\n";
    echo '</tr>'."\n";
}
echo '<tr>'."\n";
echo "\t".'<td colspan="8"><a href="edit.php">Add a contact</a></td>'."\n";
echo '</tr>'."\n";

echo '</table>'."\n";

?>

